<!doctype html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Leaflet debug page - Text Selection</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
		<link rel="stylesheet" href="../../dist/leaflet.css" />
		<link rel="stylesheet" href="../css/screen.css" />
		<script type="importmap">
			{
				"imports": {
					"leaflet": "../../dist/leaflet-src.esm.js"
				}
			}
		</script>
	</head>
	<body>
		<button id="disable" type="button">Disable text selection</button>
		<button id="enable" type="button">Enable text selection</button>
		<p>The quick brown fox jumps over the lazy dog.</p>
		<script type="module">
			import {DomUtil} from 'leaflet';

			const disableBtn = document.getElementById('disable');
			const enableBtn = document.getElementById('enable');

			disableBtn.addEventListener('click', () => DomUtil.disableTextSelection());
			enableBtn.addEventListener('click', () => DomUtil.enableTextSelection());
		</script>
	</body>
</html>
